package org.jks.service;

import java.util.ArrayList;

import org.jks.model.Flight;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FlightService extends EntityService<Flight> {

	public FlightService() {
		MODEL_NAME = Flight.class.getSimpleName();
		CLASS_NAME = Flight.class;
	}
	
	public Flight findByName(String name){
		List<Object> params = new ArrayList<Object>();
		params.add(name);
		String hql = "from "+ MODEL_NAME + " where Name=?";
		return super.get(hql, params);
	}
}
